package com.itboye.sunsun;


import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.itboye.sunsun.application.App;
import com.itboye.sunsun.luntan.LunTanDetailActivity;
import com.itboye.sunsun.support.BaseFragment;
import com.itboye.sunsun.utils.DebugLog;
import com.itboye.sunsunhome.www.aq.DeviceActivity;
import com.itboye.sunsunhome.R;
/**
 * 首页
 * @author liu
 *
 */
public class HomeFragmentH extends BaseFragment implements OnClickListener{

	private LinearLayout layoutLunTan,layoutDevice;
	private Intent intent;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		return inflater.inflate(R.layout.acyivity_collection, container, false);
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.layoutLunTan:
			intent=new Intent(getActivity(),LunTanDetailActivity.class);
			intent.putExtra("fid", "1");
			intent.putExtra("title", "水族论坛");
			intent.putExtra("subforum", "4");
			startActivity(intent);
			break;
		case R.id.layoutDevice:
			DebugLog.v("wsh", "ssaq");
			App.ctx.init();
			intent=new Intent(getActivity(),DeviceActivity.class);
			
			startActivity(intent);
			break;
		default:
			break;
		}
	}

}
